package demo.springcloud.webflux.feign.client;

import demo.springcloud.webflux.common.entity.Result;
import demo.springcloud.webflux.feign.client.impl.RestClientImpl;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

@FeignClient(value="webflux-rest",fallback = RestClientImpl.class)
public interface RestClient {

    /**
     *  根据ID查询标签
     * @param id
     * @return
     */
    @RequestMapping(value="/user/{id}",method = RequestMethod.GET)
    public Result findById(@PathVariable("id") String id);
}
